package com.ruoyi.ies.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ies.mapper.EmployeeDepartmentMapper;
import com.ruoyi.ies.domain.EmployeeDepartment;
import com.ruoyi.ies.service.IEmployeeDepartmentService;

/**
 * 部门Service业务层处理
 * 
 * @author July
 * @date 2023-06-09
 */
@Service
public class EmployeeDepartmentServiceImpl implements IEmployeeDepartmentService 
{
    @Autowired
    private EmployeeDepartmentMapper employeeDepartmentMapper;

    /**
     * 查询部门
     * 
     * @param id 部门主键
     * @return 部门
     */
    @Override
    public EmployeeDepartment selectEmployeeDepartmentById(Long id)
    {
        return employeeDepartmentMapper.selectEmployeeDepartmentById(id);
    }

    /**
     * 查询部门列表
     * 
     * @param employeeDepartment 部门
     * @return 部门
     */
    @Override
    public List<EmployeeDepartment> selectEmployeeDepartmentList(EmployeeDepartment employeeDepartment)
    {
        return employeeDepartmentMapper.selectEmployeeDepartmentList(employeeDepartment);
    }

    /**
     * 新增部门
     * 
     * @param employeeDepartment 部门
     * @return 结果
     */
    @Override
    public int insertEmployeeDepartment(EmployeeDepartment employeeDepartment)
    {
        return employeeDepartmentMapper.insertEmployeeDepartment(employeeDepartment);
    }

    /**
     * 修改部门
     * 
     * @param employeeDepartment 部门
     * @return 结果
     */
    @Override
    public int updateEmployeeDepartment(EmployeeDepartment employeeDepartment)
    {
        return employeeDepartmentMapper.updateEmployeeDepartment(employeeDepartment);
    }

    /**
     * 批量删除部门
     * 
     * @param ids 需要删除的部门主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeDepartmentByIds(Long[] ids)
    {
        return employeeDepartmentMapper.deleteEmployeeDepartmentByIds(ids);
    }

    /**
     * 删除部门信息
     * 
     * @param id 部门主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeDepartmentById(Long id)
    {
        return employeeDepartmentMapper.deleteEmployeeDepartmentById(id);
    }
}
